3.15 \(\int \sec ^m(c+d x) (A-\frac {A (1+m) \sec ^2(c+d x)}{m}) \, dx\)

Optimal. Leaf size=25 \[ -\frac {A \sin (c+d x) \sec ^{m+1}(c+d x)}{d m} \]

[Out]

-A*sec(d*x+c)^(1+m)*sin(d*x+c)/d/m

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 25, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.036, Rules used = {4043} \[ -\frac {A \sin (c+d x) \sec ^{m+1}(c+d x)}{d m} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^m*(A - (A*(1 + m)*Sec[c + d*x]^2)/m),x]

[Out]

-((A*Sec[c + d*x]^(1 + m)*Sin[c + d*x])/(d*m))

Rule 4043

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(m_.)*(csc[(e_.) + (f_.)*(x_)]^2*(C_.) + (A_)), x_Symbol] :> Simp[(A*Cot[e
 + f*x]*(b*Csc[e + f*x])^m)/(f*m), x] /; FreeQ[{b, e, f, A, C, m}, x] && EqQ[C*m + A*(m + 1), 0]

Rubi steps

\begin {align*} \int \sec ^m(c+d x) \left (A-\frac {A (1+m) \sec ^2(c+d x)}{m}\right ) \, dx &=-\frac {A \sec ^{1+m}(c+d x) \sin (c+d x)}{d m}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.34, size = 25, normalized size = 1.00 \[ -\frac {A \sin (c+d x) \sec ^{m+1}(c+d x)}{d m} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^m*(A - (A*(1 + m)*Sec[c + d*x]^2)/m),x]

[Out]

-((A*Sec[c + d*x]^(1 + m)*Sin[c + d*x])/(d*m))

________________________________________________________________________________________

fricas [A]  time = 0.44, size = 33, normalized size = 1.32 \[ -\frac {A \frac {1}{\cos \left (d x + c\right )}^{m} \sin \left (d x + c\right )}{d m \cos \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x, algorithm="fricas")

[Out]

-A*(1/cos(d*x + c))^m*sin(d*x + c)/(d*m*cos(d*x + c))

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int -{\left (\frac {A {\left (m + 1\right )} \sec \left (d x + c\right )^{2}}{m} - A\right )} \sec \left (d x + c\right )^{m}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x, algorithm="giac")

[Out]

integrate(-(A*(m + 1)*sec(d*x + c)^2/m - A)*sec(d*x + c)^m, x)

________________________________________________________________________________________

maple [C]  time = 1.42, size = 510, normalized size = 20.40 \[ \frac {i A \left (\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{-m} \left ({\mathrm e}^{i \left (\Re \left (d x \right )+\Re \relax (c )\right )}\right )^{m} 2^{m} {\mathrm e}^{-m \Im \left (d x \right )-m \Im \relax (c )} {\mathrm e}^{-\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{3} m}{2}} {\mathrm e}^{\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) m}{2}} {\mathrm e}^{\frac {i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) m}{2}} {\mathrm e}^{-\frac {i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) m}{2}} {\mathrm e}^{2 i d x} {\mathrm e}^{2 i c}-\left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{-m} \left ({\mathrm e}^{i \left (\Re \left (d x \right )+\Re \relax (c )\right )}\right )^{m} 2^{m} {\mathrm e}^{-\frac {m \left (i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{3}-i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \mathrm {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right )-i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )^{2} \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )+i \pi \,\mathrm {csgn}\left (\frac {i {\mathrm e}^{i \left (d x +c \right )}}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right ) \mathrm {csgn}\left (i {\mathrm e}^{i \left (d x +c \right )}\right ) \mathrm {csgn}\left (\frac {i}{{\mathrm e}^{2 i \left (d x +c \right )}+1}\right )+2 \Im \left (d x \right )+2 \Im \relax (c )\right )}{2}}\right )}{d m \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x)

[Out]

I*A/d/m/(exp(2*I*(d*x+c))+1)*(1/((exp(2*I*(d*x+c))+1)^m)*exp(I*(Re(d*x)+Re(c)))^m*2^m*exp(-m*Im(d*x)-m*Im(c))*
exp(-1/2*I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3*m)*exp(1/2*I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*
x+c))+1))^2*csgn(I*exp(I*(d*x+c)))*m)*exp(1/2*I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2*csgn(I/(exp(2
*I*(d*x+c))+1))*m)*exp(-1/2*I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c)))*csgn(I/(ex
p(2*I*(d*x+c))+1))*m)*exp(2*I*d*x)*exp(2*I*c)-1/((exp(2*I*(d*x+c))+1)^m)*exp(I*(Re(d*x)+Re(c)))^m*2^m*exp(-1/2
*m*(I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^3-I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2*csgn
(I*exp(I*(d*x+c)))-I*Pi*csgn(I*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))^2*csgn(I/(exp(2*I*(d*x+c))+1))+I*Pi*csgn(I
*exp(I*(d*x+c))/(exp(2*I*(d*x+c))+1))*csgn(I*exp(I*(d*x+c)))*csgn(I/(exp(2*I*(d*x+c))+1))+2*Im(d*x)+2*Im(c))))

________________________________________________________________________________________

maxima [B]  time = 0.83, size = 296, normalized size = 11.84 \[ \frac {2^{m} A \cos \left (-{\left (d x + c\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) \sin \left (2 \, d x + 2 \, c\right ) - 2^{m} A \cos \left (-{\left (d x + c\right )} m + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) \sin \left (2 \, d x + 2 \, c\right ) + {\left (2^{m} A \cos \left (2 \, d x + 2 \, c\right ) + 2^{m} A\right )} \sin \left (-{\left (d x + c\right )} {\left (m + 2\right )} + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) - {\left (2^{m} A \cos \left (2 \, d x + 2 \, c\right ) + 2^{m} A\right )} \sin \left (-{\left (d x + c\right )} m + m \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right )}{{\left (m \cos \left (2 \, d x + 2 \, c\right )^{2} + m \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, m \cos \left (2 \, d x + 2 \, c\right ) + m\right )} {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{2} \, m} d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^m*(A-A*(1+m)*sec(d*x+c)^2/m),x, algorithm="maxima")

[Out]

(2^m*A*cos(-(d*x + c)*(m + 2) + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(2*d*x + 2*c) - 2^m*A*co
s(-(d*x + c)*m + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1))*sin(2*d*x + 2*c) + (2^m*A*cos(2*d*x + 2*c)
 + 2^m*A)*sin(-(d*x + c)*(m + 2) + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) - (2^m*A*cos(2*d*x + 2*c
) + 2^m*A)*sin(-(d*x + c)*m + m*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)))/((m*cos(2*d*x + 2*c)^2 + m*s
in(2*d*x + 2*c)^2 + 2*m*cos(2*d*x + 2*c) + m)*(cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) +
1)^(1/2*m)*d)

________________________________________________________________________________________

mupad [B]  time = 2.67, size = 41, normalized size = 1.64 \[ -\frac {A\,\sin \left (2\,c+2\,d\,x\right )\,{\left (\frac {1}{\cos \left (c+d\,x\right )}\right )}^m}{d\,m\,\left (\cos \left (2\,c+2\,d\,x\right )+1\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A - (A*(m + 1))/(m*cos(c + d*x)^2))*(1/cos(c + d*x))^m,x)

[Out]

-(A*sin(2*c + 2*d*x)*(1/cos(c + d*x))^m)/(d*m*(cos(2*c + 2*d*x) + 1))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \frac {A \left (\int \left (- m \sec ^{m}{\left (c + d x \right )}\right )\, dx + \int \sec ^{2}{\left (c + d x \right )} \sec ^{m}{\left (c + d x \right )}\, dx + \int m \sec ^{2}{\left (c + d x \right )} \sec ^{m}{\left (c + d x \right )}\, dx\right )}{m} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**m*(A-A*(1+m)*sec(d*x+c)**2/m),x)

[Out]

-A*(Integral(-m*sec(c + d*x)**m, x) + Integral(sec(c + d*x)**2*sec(c + d*x)**m, x) + Integral(m*sec(c + d*x)**
2*sec(c + d*x)**m, x))/m

________________________________________________________________________________________